package LeetCode刷题;

/**
 * @program: Java_Study
 * @author: Xiaofan
 * @createTime: 2021-10-04 15:12
 * @description: Functions of this class is
 * 官方题解：
 * public class Solution {
 *     public boolean wordBreak(String s, List<String> wordDict) {
 *         Set<String> wordDictSet = new HashSet(wordDict);
 *         boolean[] dp = new boolean[s.length() + 1];
 *         dp[0] = true;
 *         for (int i = 1; i <= s.length(); i++) {
 *             for (int j = 0; j < i; j++) {
 *                 if (dp[j] && wordDictSet.contains(s.substring(j, i))) {
 *                     dp[i] = true;
 *                     break;
 *                 }
 *             }
 *         }
 *         return dp[s.length()];
 *     }
 * }
 **/
public class NoNoNo动态规划单词拆分 {
    public static void main(String[] args) {
        String s="leetcode";
        StringBuffer str=new StringBuffer(s);
    }
}